:root {
    --primary: #4fc3f7;
    --primary-dark: #039be5;
    --secondary: #f48fb1;
    --light: #e1f5fe;
    --dark: #01579b;
    --text: #212121;
    --text-light: #757575;
    --background: #f5f9ff;
    --card: #ffffff;
    --success: #66bb6a;
    --warning: #ffca28;
    --danger: #ef5350;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--background), #e3f2fd);
    min-height: 100vh;
    padding: 20px;
    color: var(--text);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(3, 155, 229, 0.2);
    overflow: hidden;
}

/* 登录界面 */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 30px;
}

.login-box {
    background: var(--card);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box h1 {
    color: var(--primary-dark);
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.login-box svg {
    width: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 5px rgba(3, 155, 229, 0.3));
}

.input-group {
    margin-bottom: 25px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-light);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.3);
}

.btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0;
    width: 150px;
    height: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(3, 155, 229, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(3, 155, 229, 0.6);
}

.btn:active {
    transform: translateY(1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #d32f2f);
    box-shadow: 0 5px 15px rgba(239, 83, 80, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #f57c00);
    box-shadow: 0 5px 15px rgba(255, 202, 40, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #388e3c);
    box-shadow: 0 5px 15px rgba(102, 187, 106, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #ccc, #aaa);
    box-shadow: 0 5px 15px rgba(149, 149, 149, 0.4);
}

/* 主界面 */
header {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #d81b60);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
}

/* 标签页 */
.tabs {
    display: flex;
    background: var(--light);
    border-bottom: 1px solid rgba(3, 155, 229, 0.2);
}

.tab {
    padding: 20px 30px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab.active {
    color: var(--primary-dark);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
}

.tab i {
    font-size: 1.2rem;
}

.tab-content {
    padding: 30px;
    display: none;
}

.tab-content.active {
    display: block;
}

/* 表格和列表 */
.card {
    background: var(--card);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-btns {
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-gap: 10px;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th {
    background: var(--light);
    padding: 15px;
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid var(--primary);
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: center;
    white-space: nowrap;

    .btn {
        padding: 0 12px;
        width: auto;
        height: 32px;
        font-size: 0.9em;
        display: inline-flex;
        flex-flow: row;
        align-items: center;
        justify-content: center;
        font-weight: 400;
        margin: 0 2px;
    }
}

tr:hover {
    background: rgba(79, 195, 247, 0.05);
}

input[type='checkbox'] {
    transform: scale(1.5);
}

.checkbox-cell {
    width: 50px;
    text-align: center;
}

.status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.status-online {
    background: rgba(102, 187, 106, 0.2);
    color: var(--success);
}

.status-offline {
    background: rgba(239, 83, 80, 0.2);
    color: var(--danger);
}

.status-static {
    background: rgba(255, 202, 40, 0.2);
    color: #f57c00;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--card);
    margin: 0;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 700px;
    position: absolute;
    left: 50%;
    top: 40%;
    transform: translate(-50%,-50%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.close-btn {
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--danger);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    header {
        padding: 15px 20px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .tab {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .tab i {
        font-size: 1rem;
    }

    .tab-content {
        padding: 20px;
    }

    .modal-content {
        margin: 10% auto;
    }
}

@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 0 33.33%;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .pagination-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .login-box {
        padding: 25px;
    }

    .btn {
        font-size: 12px;
        height: 40px;
        margin: 2px;
    }

    .tab {
        flex: 1 0 50%;
        padding: 12px 10px;
    }

    .user-info span {
        display: none;
    }

    .modal-content {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}